<template>
  <div>
    <van-nav-bar title="热销折扣" left-text="返回" left-arrow @click-left="onClickLeft" />
    <div class="bigbox">
      <div class="shapbox" v-for="(item, index) in arr" :key="index">
        <img :src="item.img_big_logo" alt="" class="shopimg" @click="detil(item)" />

        <div class="van-multi-ellipsis--l2">
          <h2>{{ item.title }}</h2>
        </div>
        <p class="text">{{ item.current_price }}</p>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  methods: {
    detil(item) {
      this.$router.push({
        path: '/detail',
        query: { id: item.goods_id }
      })
    },
    onClickLeft() {
      this.$router.back()
    }
  },
  data() {
    return {
      arr: []
    }
  },
  mounted() {
    this.arr = JSON.parse(this.$route.query.ishot)
  }
}
</script>
<style lang="scss">
.bigbox {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  box-sizing: border-box;
  padding-top: 5px;
  .shapbox {
    width: 180px;
    height: 300px;
    display: flex;
    flex-flow: column;
    align-items: center;
    .shopimg {
      width: 100%;
    }
    .text {
      color: red;
    }
  }
}
</style>
